package com.example.wechattakeaway.mapper;

import com.example.wechattakeaway.entity.MerMenu;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface MerMenuMapper {
    /**
     * 根据id删除菜单
     * @param menuId
     * @return
     */
    int deleteByPrimaryKey(Integer menuId);

    /**
     * 添加菜单
     * @param merMenu
     * @return
     */
    int insert(MerMenu merMenu);

    int insertSelective(MerMenu record);

    /**
     * 根据id查询菜单
     * @param menuId
     * @return
     */
    MerMenu selectByPrimaryKey(Integer menuId);

    /**
     * 根据商家id查询菜单列表
     * @param merchantId
     * @return
     */
    List<MerMenu> selectByMerchantId(Integer merchantId);

    /**
     * 编辑菜单
     * @param merMenu
     * @return
     */
    int updateByPrimaryKeySelective(MerMenu merMenu);



    int updateByPrimaryKey(MerMenu record);
}